﻿function containsAllAscii(str) {
    return /^[\040-\176]*$/.test(str);
}
function checkNameValidate(control, sms) {
    var re_name = /[^a-zA-Z\s]/g
    if (re_name.test(control.value)) {// if not only containt A-Z a-z space; return true; example:str = firstname.value
        alert("Please use only standard characters (a-z) in " + sms + ".");
        control.focus();
        control.select();
        return false;
    }
    //return re_name.test(str);
}

function stripHTML() {
    var re = /(<[^>]*>)/gi;
    for (i = 0; i < arguments.length; i++)
        arguments[i].value = arguments[i].value.replace(re, "")
}